<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('项目列表一')"/>
</head>
<style>
    /*.table{*/
    /*    table-layout: fixed;*/
    /*}*/
    .table td:hover {
        overflow: visible;
        white-space: normal;
    }

    .table td {
        word-wrap: break-word;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    p {
        text-align: left; /* 强制所有段落左对齐 */
    }

    .two-line-ellipsis {
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 限制为两行 */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal; /* 允许换行 */
        word-break: break-all; /* 允许在任意字符间断行 */
        line-height: 1.5em; /* 设置行高 */
        max-height: 3em; /* 两行行高的总和 */
    }
</style>

<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>

                        <li>
                            <label>实：</label>
                            <select name="ActualCirculationStatus"
                                    th:with="type=${@dict.getType('actual_circulation_status')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}" th:selected="${dict.dictValue == '0'}"></option>
                            </select>
                        </li>

                        <li>
                            <label>动：</label>
                            <select name="dynamicTopicsStatus"
                                    th:with="type=${@dict.getType('dynamic_topics_status')}">
                                <option value="">请选择</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>喜：</label>
                            <select name="dynamicTopicsSurpriseStatus"
                                    th:with="type=${@dict.getType('dynamic_topics_surprise_status')}">
                                <option value="">请选择</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>彩：</label>
                            <select name="dynamicTopicsEggStatus"
                                    th:with="type=${@dict.getType('dynamic_topics_egg_status')}">
                                <option value="">请选择</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>固：</label>
                            <select name="fixTopicsStatus"
                                    th:with="type=${@dict.getType('fix_topics_status')}">
                                <option value="">请选择</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>股票名称：</label>
                            <input type="text" name="stockName"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:board:add">
                <i class="fa fa-plus"></i> 添加
            </a>
            <a class="btn btn-primary single disabled" onclick="$.operate.edit()"
               shiro:hasPermission="system:board:edit">
                <i class="fa fa-edit"></i> 修改
            </a>
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
               shiro:hasPermission="system:board:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:board:export">
                <i class="fa fa-download"></i> 导出
            </a>
            <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">
                <i class="fa fa-upload"></i> 导入
            </a>
            <a class="btn btn-info" onclick="javascript:batchStockMainBoardDetail()"
               shiro:hasPermission="system:user:import">
                <i class="fa fa-upload"></i> AI分析
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var detailFlag = [[${@permission.hasPermi('system:board:edit')}]];
    var editFlag = [[${@permission.hasPermi('system:board:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:board:remove')}]];
    var prefix = ctx + "system/main/board/one";

    $(function () {
        var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                importUrl: prefix + "/importData",
                detailUrl: prefix + "/detail/{id}",
                importTemplateUrl: prefix + "/importTemplate",
                modalName: "主板",
                columns: [{
                    checkbox: true
                },
                    {
                        field: 'mainId',
                        title: '主板ID',
                        visible: false
                    },
                    {
                        field: 'stockName',
                        title: '名称',
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else{
                                const one = "("+row.stockCode+")";
                                if(value.length === 3){
                                    return value +" "+ one;
                                }else{
                                    return value + one;
                                }
                            }
                        },
                        cellStyle: function (value, row, index) {
                            return {
                                css: {
                                    "min-width": "70px",
                                    "max-width": "600px",           // 控制列宽
                                    "white-space": "normal",        // ✅ 允许自动换行（关键！）
                                    "word-break": "break-all",      // ✅ 支持中文/长单词断行
                                    "overflow": "visible",          // 或 hidden，看是否需要滚动
                                    "line-height": "1.4",           // 行高
                                    "vertical-align": "top"         // 内容靠上对齐
                                }
                            };
                        }
                    },
                    {
                        field: 'fervorDetail',
                        title: '炽',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else{
                                return $.table.tooltip(value, 3, "open");
                            }
                        }
                    },
                    // {
                    //     field: 'topBoardDetail',
                    //     title: '顶',
                    //     sortable: true,
                    //     formatter: function (value, row, index) {
                    //         if (value === null || value === undefined || value === "") {
                    //             return value;
                    //         } else {
                    //             return $.table.tooltip(value, 1, "open");
                    //         }
                    //     }
                    // },

                    {
                        field: 'supportBoardDetail',
                        title: '赞',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                return $.table.tooltip(value, 2, "open");
                            }
                        }
                    },
                    // {
                    //     field: 'chiliDetail',
                    //     title: '辣',
                    //     sortable: true,
                    //     formatter: function (value, row, index) {
                    //         if (value === null || value === undefined || value === "") {
                    //             return value;
                    //         } else{
                    //             return $.table.tooltip(value, 1, "open");
                    //         }
                    //     }
                    // },
                    // {
                    //     field: 'seat',
                    //     title: '榜',
                    //     sortable: true,
                    //     formatter: function (value, row, index) {
                    //         if (value === null || value === undefined || value === "") {
                    //             return value;
                    //         } else {
                    //             return $.table.tooltip(value, 1, "open");
                    //         }
                    //     }
                    // },
                    // {
                    //     field: 'actualCirculationValue',
                    //     title: '实',
                    //     sortable: true,
                    //     formatter: function (value, row, index) {
                    //         if (value === null || value === undefined || value === "") {
                    //             return value;
                    //         } else {
                    //             value = Math.floor(value);
                    //             const one = row.dynamicTopicsDetailShowOne === null || row.dynamicTopicsDetailShowOne === undefined
                    //             || row.dynamicTopicsDetailShowOne === "" || row.dynamicTopicsDetailShowOne === "-" ? false : true;
                    //
                    //             const two = row.dynamicTopicsDetailShowTwo === null || row.dynamicTopicsDetailShowTwo === undefined
                    //             || row.dynamicTopicsDetailShowTwo === "" || row.dynamicopicsDetailShowTwo === "-" ? false : true;
                    //
                    //             const three = row.dynamicTopicsDetailShowThree === null || row.dynamicTopicsDetailShowThree === undefined
                    //             || row.dynamicTopicsDetailShowThree === "" || row.dynamicTopicsDetailShowThree === "-" ? false : true;
                    //
                    //             const four = row.dynamicTopicsDetailShowFour === null || row.dynamicTopicsDetailShowFour === undefined
                    //             || row.dynamicTopicsDetailShowFour === "" || row.dynamicTopicsDetailShowFour === "-" ? false : true;
                    //
                    //             const five = row.dynamicTopicsDetailShowFive === null || row.dynamicTopicsDetailShowFive === undefined
                    //             || row.dynamicTopicsDetailShowFive === "" || row.dynamicTopicsDetailShowFive === "-" ? false : true;
                    //
                    //             const six = row.dynamicTopicsDetailShowSix === null || row.dynamicTopicsDetailShowSix === undefined
                    //             || row.dynamicTopicsDetailShowSix === "" || row.dynamicTopicsDetailShowSix === "-" ? false : true;
                    //
                    //             const seven = row.dynamicTopicsDetailShowSeven === null || row.dynamicTopicsDetailShowSeven === undefined
                    //             || row.dynamicTopicsDetailShowSeven === "" || row.dynamicTopicsDetailShowSeven === "-" ? false : true;
                    //
                    //
                    //             const eight = row.dynamicTopicsDetailShowEight === null || row.dynamicTopicsDetailShowEight === undefined
                    //             || row.dynamicTopicsDetailShowEight === "" || row.dynamicTopicsDetailShowEight === "-" ? false : true;
                    //
                    //
                    //             const nine = row.dynamicTopicsDetailShowNine === null || row.dynamicTopicsDetailShowNine === undefined
                    //             || row.dynamicTopicsDetailShowNine === "" || row.dynamicTopicsDetailShowNine === "-" ? false : true;
                    //
                    //
                    //             const ten = row.dynamicTopicsDetailShowTen === null || row.dynamicTopicsDetailShowTen === undefined
                    //             || row.dynamicTopicsDetailShowTen === "" || row.dynamicTopicsDetailShowTen === "-" ? false : true;
                    //
                    //             const eleven = row.dynamicTopicsDetailShowEleven === null || row.dynamicTopicsDetailShowEleven === undefined
                    //             || row.dynamicTopicsDetailShowEleven === "" || row.dynamicTopicsDetailShowEleven === "-" ? false : true;
                    //
                    //             const twelve = row.dynamicTopicsDetailShowTwelve === null || row.dynamicTopicsDetailShowTwelve === undefined
                    //             || row.dynamicTopicsDetailShowTwelve === "" || row.dynamicTopicsDetailShowTwelve === "-" ? false : true;
                    //
                    //             const thirteen  = row.dynamicTopicsDetailShowThirteen === null || row.dynamicTopicsDetailShowThirteen === undefined
                    //             || row.dynamicTopicsDetailShowThirteen === "" || row.dynamicTopicsDetailShowThirteen === "-" ? false : true;
                    //
                    //             const fourteen = row.dynamicTopicsDetailShowFourteen === null || row.dynamicTopicsDetailShowFourteen === undefined
                    //             || row.dynamicTopicsDetailShowFourteen === "" || row.dynamicTopicsDetailShowFourteen === "-" ? false : true;
                    //
                    //             const fifteen = row.dynamicTopicsDetailShowFifteen === null || row.dynamicTopicsDetailShowFifteen === undefined
                    //             || row.dynamicTopicsDetailShowFifteen === "" || row.dynamicTopicsDetailShowFifteen === "-" ? false : true;
                    //
                    //             const sixteen = row.dynamicTopicsDetailShowSixteen === null || row.dynamicTopicsDetailShowSixteen === undefined
                    //             || row.dynamicTopicsDetailShowSixteen === "" || row.dynamicTopicsDetailShowSixteen === "-" ? false : true;
                    //
                    //             const seventeen = row.dynamicTopicsDetailShowSeventeen === null || row.dynamicTopicsDetailShowSeventeen === undefined
                    //             || row.dynamicTopicsDetailShowSeventeen === "" || row.dynamicTopicsDetailShowSeventeen === "-" ? false : true;
                    //
                    //             const eighteen = row.dynamicTopicsDetailShowEighteen === null || row.dynamicTopicsDetailShowEighteen === undefined
                    //             || row.dynamicTopicsDetailShowEighteen === "" || row.dynamicTopicsDetailShowEighteen === "-" ? false : true;
                    //
                    //             const nineteen   = row.dynamicTopicsDetailShowNineteen === null || row.dynamicTopicsDetailShowNineteen === undefined
                    //             || row.dynamicTopicsDetailShowNineteen === "" || row.dynamicTopicsDetailShowNineteen === "-" ? false : true;
                    //
                    //             const twenty = row.dynamicTopicsDetailShowTwenty === null || row.dynamicTopicsDetailShowTwenty === undefined
                    //             || row.dynamicTopicsDetailShowTwenty === "" || row.dynamicTopicsDetailShowTwenty === "-" ? false : true;
                    //
                    //             if (!one && !two && !three && !four && !five && !six && !seven && !eight && !nine && !ten
                    //                 && !eleven && !twelve && !thirteen && !fourteen && !fifteen && !sixteen && !seventeen && !eighteen && !nineteen && !twenty) {
                    //                 return $.table.tooltip(value, value.length, "open");
                    //             } else {
                    //                 if (one) {
                    //                     value += " "+"【"+row.dynamicTopicsDetailShowOne+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 } else if (two) {
                    //                     value += " "+"【"+row.dynamicTopicsDetailShowTwo+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 } else if (three) {
                    //                     value += " "+"【"+row.dynamicTopicsDetailShowThree+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 } else if (four) {
                    //                     value += " "+"【"+row.dynamicTopicsDetailShowFour+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 } else if (five) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowFive+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 } else if (six) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowSix+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 } else if (seven) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowSeven+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 } else if (eight) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowEight+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 } else if (nine) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowNine+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 } else if (ten) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowTen+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (eleven) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowEleven+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (twelve) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowTwelve+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (thirteen) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowThirteen+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (fourteen) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowFourteen+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (fifteen) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowFifteen+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (sixteen){
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowSixteen+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (seventeen) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowSeventeen+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (eighteen) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowEighteen+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (nineteen) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowNineteen+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }else if (twenty) {
                    //                     value += " "+"【"+ row.dynamicTopicsDetailShowTwenty+"】"
                    //                     return $.table.tooltip(value, 2, "open");
                    //                 }
                    //             }
                    //         }
                    //     }
                    // },
                    {
                        field: 'concept',
                        title: '概',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                return value;
                            }
                        },
                        cellStyle: function (value, row, index) {
                            return {
                                css: {
                                    "min-width": "370px",
                                    "max-width": "600px",           // 控制列宽
                                    "white-space": "normal",        // ✅ 允许自动换行（关键！）
                                    "word-break": "break-all",      // ✅ 支持中文/长单词断行
                                    "overflow": "visible",          // 或 hidden，看是否需要滚动
                                    "line-height": "1.4",           // 行高
                                    "vertical-align": "top"         // 内容靠上对齐
                                }
                            };
                        }

                    },
                    {
                        field: 'limitUpReasonDetail',
                        title: '原',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "" || value === "-") {
                                return value;
                            } else {
                                var html = [];
                                html.push(value);
                                var showValue = html.join('');
                                return showValue;
                                //return $.table.tooltip(showValue, 70, "open");
                            }
                        },
                        cellStyle: function (value, row, index) {
                            return {
                                css: {
                                    "min-width": "800px",
                                    "max-width": "600px",           // 控制列宽
                                    "white-space": "normal",        // ✅ 允许自动换行（关键！）
                                    "word-break": "break-all",      // ✅ 支持中文/长单词断行
                                    "overflow": "visible",          // 或 hidden，看是否需要滚动
                                    "line-height": "1.4",           // 行高
                                    "vertical-align": "top"         // 内容靠上对齐
                                }
                            };
                        }
                    },
                    {
                        title: '操作',
                        align: 'center',
                        formatter:
                            function (value, row, index) {
                                var actions = [];
                                actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.mainId + '\',\'' + 1300 + '\',\'' + 800 + '\')"><i class="fa fa-search"></i>详细</a>');
                                return actions.join('');
                            }
                    },
                    {
                        field: 'sectorMarkupSortStock',
                        title: '板',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "" || value === "-") {
                                return value;
                            } else {
                                var html = [];
                                html.push('联');
                                html.push(value);
                                var aa = html.join('');
                                return $.table.tooltip(aa, 1, "openHtml");
                            }
                        }
                    },



                    {
                        field: 'rightFistFrequencyTime',
                        title: '右',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.rightFistDetail == null || row.rightFistDetail == "-" ? "" : row.rightFistDetail;
                                day += " ↗" + row.rightFistDegree + "°C" + detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    },
                    {
                        field: 'rebarTime',
                        title: '钢',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.rebarDetail == null || row.rebarDetail == "-" ? "" : " "+row.rebarDetail;
                                day += detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    },
                    {
                        field: 'hardBoardTime',
                        title: '硬',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.hardBoardDetail == null || row.hardBoardDetail == "-" ? "" : " "+row.hardBoardDetail;
                                day += detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    },
                    {
                        field: 'crazeTime',
                        title: '狂',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.crazeDetail == null || row.crazeDetail == "-" ? "" : " "+row.crazeDetail;
                                day += detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    },
                    {
                        field: 'warmUpFrequencyTime',
                        title: '热',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                const day = value.substring(8, 11);
                                const formattedDate = day;
                                return formattedDate;
                            }
                        }
                    },
                    {
                        field: 'leftFistFrequencyTime',
                        title: '左',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                const month = value.substring(5, 7);
                                const day = value.substring(8, 11);
                                const formattedDate = day;
                                return formattedDate;
                            }
                        }
                    },

                    {
                        field: 'straightPunchFrequencyTime',
                        title: '直',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                const month = value.substring(5, 7);
                                const day = value.substring(8, 11);
                                const formattedDate = day;
                                return formattedDate;
                            }
                        }
                    },

                    {
                        field: 'assaultFrequencyTime',
                        title: '袭',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                const month = value.substring(5, 7);
                                const day = value.substring(8, 11);
                                const formattedDate = day;
                                return formattedDate;
                            }
                        }
                    },
                    {
                        field: 'rushFrequencyTime',
                        title: '冲',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.rushDetail == null || row.rushDetail == "-" ? "" : row.rushDetail;
                                day += " ↗" + row.rushDegree + "°C" + detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    },


                    {
                        field: 'reversionFrequencyTime',
                        title: '逆',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.reversionFrequencyDetail == null || row.reversionFrequencyDetail == "-" ? "" : row.reversionFrequencyDetail;
                                day += detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    },
                    {
                        field: 'sneakAttackFrequencyTime',
                        title: '偷',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                const month = value.substring(5, 7);
                                const day = value.substring(8, 11);
                                const formattedDate = day;
                                return formattedDate;
                            }
                        }
                    },

                    {
                        field: 'fierceAttackFrequencyTime',
                        title: '猛',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.fierceAttackDetail == null || row.fierceAttackDetail == "-" ? "" : row.fierceAttackDetail;
                                day += " ↗" + row.fierceAttackDegree + "°C" + detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    },
                    {
                        field: 'sectorArkupStockCountSort',
                        title: '块',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "" || value === "-") {
                                return value;
                            } else {

                                var html = [];
                                html.push('动');
                                html.push(value);
                                var aa = html.join('');
                                return $.table.tooltip(aa, 1, "open");
                            }
                        }
                    },
                    {
                        field: 'hookFrequencyTime',
                        title: '勾',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.hookDetail == null || row.hookDetail == "-" ? "" : row.hookDetail;
                                day += " ↗" + row.hookDegree + "°C" + detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    },
                    {
                        field: 'investigateFrequencyTime',
                        title: '侦',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.investigateDetail == null || row.investigateDetail == "-" ? "" : row.investigateDetail;
                                day += " ↗" + row.investigateDegree + "°C" + detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    },
                    {
                        field: 'embattleFrequencyTime',
                        title: '布',
                        sortable: true,
                        formatter: function (value, row, index) {
                            if (value === null || value === undefined || value === "") {
                                return value;
                            } else {
                                var day = value.substring(8, 11);
                                var detail = row.embattleDetail == null || row.embattleDetail == "-" ? "" : row.embattleDetail;
                                day += " ↘" + row.embattleDegree + "°C" + detail
                                return $.table.tooltip(day, 2, "open");
                            }
                        }
                    }

                ]
            }
        ;
        $.table.init(options);
    });


    function batchStockMainBoardDetail() {

        $.modal.confirm("确认要生成主板股票细节表数据吗?", function () {
            location.href = prefix + "/batchStockMainBoardDetail";
            layer.msg('执行成功,正在生成代码请稍候…', {icon: 1});
        });
    }

    /* 是否购买显示 */
    function statusTools(row) {
        if (row.purchaseLevel == 1) {
            return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.mainId + '\')"></i> ';
        } else {
            return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.mainId + '\')"></i> ';
        }
    }

    /* 是否购买-停用 */
    function disable(mainId) {
        $.modal.confirm("确认要停用购买吗？", function () {
            $.operate.post(prefix + "/changeStatus", {"mainId": mainId, "purchaseLevel": 1});
        })
    }

    /* 是否购买启用 */
    function enable(mainId) {
        $.modal.confirm("确认要启用购买吗？", function () {
            $.operate.post(prefix + "/changeStatus", {"mainId": mainId, "purchaseLevel": 0});
        })
    }

</script>
</body>

<!-- 导入区域 -->
<script id="importTpl" type="text/template">
    <form enctype="multipart/form-data" class="mt20 mb10">
        <div class="col-xs-offset-1">
            <input type="file" id="file" name="file"/>
            <div class="mt10 pt5">
                <input type="checkbox" id="updateSupport" name="updateSupport"
                       title="如果登录账户已经存在，更新这条数据。">
                &nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i
                    class="fa fa-file-excel-o"></i> 下载模板</a>
            </div>
            <font color="red" class="pull-left mt10">
                提示：仅允许导入“xls”或“xlsx”格式文件！
            </font>
        </div>
    </form>
</script>
</html>